1. Field of the Invention
The present invention relates to an image measurement device, and more specifically to improvement in an image measurement device that extracts an edge in a workpiece image obtained by photographing a workpiece, to measure a dimension of the workpiece.
2. Description of Related Art
An image measurement device is a device that photographs a workpiece to acquire a workpiece image and extracts an edge in the workpiece image to measure a dimension and a shape of the workpiece (e.g., JP 2012-32224 A, JP 2012-32341 A, JP 2012-32344 A, JP 2012-159409 A, and JP 2012-159410 A). Normally, the workpiece is placed on a movable stage that is movable in X-, Y-, and Z-axis directions. By moving the movable stage in the Z-axis direction, the workpiece image is brought into focus, and by moving the movable stage in the X- or Y-axis direction, a position of the workpiece is adjusted into a field of view.
Since the workpiece image is an extremely accurate analog of the workpiece irrespective of a position of the movable stage in the Z-axis direction, determination of a distance and an angle on the workpiece image allows detection of an actual dimension on the workpiece. Edge extraction is performed by analyzing a change in luminance of the workpiece image, detecting edge points, and fitting a geometric figure such as a straight line, a circle, or an arc to the detected plurality of edge points, whereby an edge showing a boundary between the workpiece and a background, and roughness on the workpiece is obtained. The dimension of the workpiece is measured as a distance or an angle between the edges obtained in such a manner, or a central position or a diameter of a circular edge. Further, a difference (error) between the measured dimension value and a design value is compared as a tolerance, to perform quality determination.
In the case of measuring an outer shape of the workpiece by use of such an image measurement device, there is often used transmittance illumination for irradiating the workpiece on the stage with illumination light from the opposite side to a camera. In contrast, in the case of measuring a non-through hole, a step, and roughness on the workpiece, there is often used epi-illumination for irradiating the workpiece on the stage with illumination light from the same side as the camera.
In the conventional image measurement device, a texture on the workpiece surface, namely, a processing mark, a pattern, or fine roughness, may be erroneously extracted as an edge in dimension measurement using the epi-illumination, and the dimension measurement is thus difficult to stabilize as compared to the case of using the transmittance illumination, which has been problematic. Therefore, in accordance with a shape and a material of the workpiece, a variety of illumination devices have been separately used or an irradiation position with illumination light has been adjusted.
However, the selection of the type of illumination and the adjustment of the irradiation position require a wealth of knowledge based on expertise and experience, and in the dimension measurement using the epi-illumination, only a skilled person could fully exert performance of the device, which has been problematic. In particular, even with the same workpiece, when a position of a measurement target place varies, an appropriate type of illumination and an appropriate irradiation position also change, and thus only the skilled person could appropriately set the type of illumination and the irradiation position in accordance with the measurement target place, which has been problematic.